<template>
<div class="share-container">
  <div v-for="dat in data" :key="dat.id">
    <TopicCard :data="dat" :is-comment="false"/>
    <Divide/>
  </div>
</div>
</template>

<script lang="ts" setup>
import TopicCard from "@/components/TopicCard.vue";
import Divide from "@/components/Divide.vue";
import {onMounted, ref} from "vue";
import {getAll} from "@/api/topicAPI";

const data = ref([])


onMounted(() => {
  getAll()
      .then(res => {
        console.log(res)
        data.value = res.data
      })
})

</script>

<style scoped lang="less">

</style>